1. Field of the Invention
The present invention relates to an encoding apparatus and a decoding apparatus, and in particular, to an encoding apparatus for encoding an audio signal into an encoded stream having a reduced amount of information while still maintaining the same sound quality of the audio signal, and a decoding apparatus for decoding the encoded data stream.
2. Description of the Related Art
A number of encoding methods and decoding methods for an audio signal containing a speech and/or music signal have been developed to date. Among others, a method in conformity with IS13818-7, which is internationally standardized by the ISO/IEC, has recently been acknowledged and evaluated as a high sound-quality and efficient encoding method. This encoding method is referred to as AAC.
Recently, AAC has been adopted by the standard referred to as MPEG4. MPEG4-AAC, which has several extended functions over IS13818-7 is now defined. An example of the encoding process of MPEG4-AAC is described in INFOMATIVE PART.
FIG. 10 is a diagram showing a structure of a conventional encoding apparatus 1000. A frequency spectrum stream is input to the encoding apparatus 1000. The frequency spectrum stream is generated as follows.
An audio signal is input to a time-frequency transformation section (not shown) in the form of an audio discrete signal obtained by sampling the audio signal. The time-frequency transformation section transforms a discrete signal on a time axis into a spectrum on a frequency axis by, for example, orthogonal transformation. Herein, the entirety of a spectrum on the frequency axis obtained by transformation from the discrete signal on the time axis is referred to as a “one-frame frequency spectrum”. A one-frame frequency spectrum is divided into a plurality of frequency spectra respectively corresponding to a plurality of frequency bands. A frequency spectrum stream is input to the encoding apparatus 1000.
The encoding apparatus 1000 includes a spectrum amplification section 1010, a spectrum quantization section 1020, a Huffman encoding section 1030, and an encoded stream generation section 1040.
The spectrum amplification section 1010 receives a frequency spectrum stream representing a frequency spectrum corresponding to a prescribed frequency band among the plurality of frequency bands, and amplifies the received frequency spectrum using a prescribed gain so as to generate an amplified spectrum stream. The spectrum amplification section 1010 also encodes the prescribed gain so as to generate an encoded gain.
The spectrum quantization section 1020 quantizes data of the amplified spectrum stream using a prescribed transformation formula so as to generate a quantized spectrum stream. In the case of the AAC method, the spectrum quantization section 1020 performs quantization by rounding off the data of the amplified spectrum-stream, which is represented by a floating-point part, into an integer.
The Huffman encoding section 1030 Huffman-encodes a plurality of data units in the quantized spectrum stream so as to generate a Huffman-encoded spectrum stream.
The encoded stream generation section 1040 generates an encoded stream including the encoded gain and the Huffman-encoded spectrum stream, and transfers the encoded stream to the decoding apparatus (not shown).
The conventional encoding apparatus 1000 having the above-described structure has the following problems.
Recently, there is a demand to reduce the amount of information of an encoded stream obtained by encoding an audio signal so as to enhance the compression ratio of the audio signal.
In the encoding apparatus 1000, the compression ratio of information relies on the Huffman encoding section 1030. More specifically, in order to encode an audio signal at a higher compression ratio into a data stream having a reduced amount of information, the gain of the spectrum amplification section 1010 is controlled to reduce a data value of the quantized spectrum stream and thus to reduce the amount of information to be encoded by the Huffman encoding section 1030.
However, such an operation results in a phenomenon where a frequency spectrum obtained by decoding the Huffman-encoded spectrum stream exhibits the amplitude value (quantized value) of zero over a wide frequency range. This means a sufficiently high sound quality cannot be obtained.